package xyz.sxcloud.gkcrm.system.service;

import com.github.pagehelper.PageHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import xyz.sxcloud.gkcrm.system.entity.UserAccount;
import xyz.sxcloud.gkcrm.system.mapper.TestMapper;
import xyz.sxcloud.gkcrm.system.mapper.UserAccountMapper;

import java.util.List;
@Service
public class UserAccountServiceImpl implements UserAccountService {
    @Autowired
    private TestMapper testMapper;

    @Autowired
    private UserAccountMapper userAccountMapper;

    /**
     * @return
     */
    @Override
    public List<UserAccount> queryAllUserAccount() {
        return testMapper.queryAllUserAccount();
    }

    /**
     * 使用分页插件实现分页查询
     *
     * @param page 页码
     * @param size 每页显示的数据量
     * @return ListUserAccount
     */
    @Override
    public List<UserAccount> queryUserListByPage(Integer page, Integer size) {
        PageHelper.startPage(page,size);
        return userAccountMapper.queryUserListByPage();
    }
}
